<template>
 <div>
   <table border="1">
     <tr>
       <td>年级</td>
       <td>课程</td>
     </tr>
     <tr v-for="i in courselist">
       <td>{{i.name}}</td>
       <td>
         <table>
           <tr>
             <td v-for="j in i.courses">{{j.name}}</td>
           </tr>
         </table>
       </td>

     </tr>
   </table>

 </div>
</template>

<script>
export default {
name: "course",
  data(){
  return{
    courselist:[]
  }
  },
  methods:{
  getlist(){
    this.axios.get('showcourse/').then(res=>{
      this.courselist=res.data.list
    })

  }
  },
  mounted() {
  this.getlist()
  }
}
</script>

<style scoped>

</style>
